--------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Volumes/rdss_meghrogers/Current Research/Markets-Pridemore/Work/MA
> R06-PanelModels-UNODC.log
  log type:  text
 opened on:   5 May 2025, 14:47:24

. 
. //  program:    Stata 
. //  task:       Panel Models 
. //  project:    Markets  
. 
. version
version 18.5

. clear all

. macro drop _all

. set linesize 80

. set more off

. local tag " 06-25-24| Cleaned 06-25-24"

. local file "MAR06-PanelModels-UNODC"

. local note "|`tag' | `file'"

. local opt "noparen sideway excel noaster  bdec(2)  sdec(2)  pdec(3)   adec(2) 
> e(r2) stats(coef se pval)"

. local dv "lrhom_un"

. local iv "fraser"

. local iv2 "infantmort" 

. local cont "edu unemp  popdense perurban  sexratio"

. 
. //      #0
. //      Loading data 
. use MAR05-QuantModels-UNODC.dta

. 
. //      #1
. //      Panel models 
. xtreg `dv' fraser `iv2' `cont', fe vce(cluster CID) 

Fixed-effects (within) regression               Number of obs     =      1,949
Group variable: CID                             Number of groups  =        123

R-squared:                                      Obs per group:
     Within  = 0.1913                                         min =          5
     Between = 0.2204                                         avg =       15.8
     Overall = 0.2113                                         max =         20

                                                F(7, 122)         =      27.74
corr(u_i, Xb) = -0.1324                         Prob > F          =     0.0000

                                  (Std. err. adjusted for 123 clusters in CID)
------------------------------------------------------------------------------
             |               Robust
    lrhom_un | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      fraser |  -.1410917   .0640951    -2.20   0.030    -.2679745    -.014209
  infantmort |  -.0055433   .0042829    -1.29   0.198    -.0140217    .0029351
         edu |  -1.930045   .5667989    -3.41   0.001     -3.05208   -.8080095
       unemp |     .00663    .005326     1.24   0.216    -.0039133    .0171734
    popdense |  -.0003164   .0000724    -4.37   0.000    -.0004597    -.000173
    perurban |  -.0158748   .0107785    -1.47   0.143    -.0372119    .0054624
    sexratio |  -.0143736   .0042746    -3.36   0.001    -.0228355   -.0059116
       _cons |   6.094406   .8099195     7.52   0.000     4.491089    7.697722
-------------+----------------------------------------------------------------
     sigma_u |  1.0898811
     sigma_e |  .28626146
         rho |  .93546504   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.         outreg2 using `file'.dta, replace `opt' 
MAR06-PanelModels-UNODC.xml
dir : seeout

. 
. foreach var in   heritage rol {
  2.         xtreg `dv' `var' `iv2' `cont', fe vce(cluster CID) 
  3.         outreg2 using `file'.dta, append `opt' 
  4.         }

Fixed-effects (within) regression               Number of obs     =      1,878
Group variable: CID                             Number of groups  =        120

R-squared:                                      Obs per group:
     Within  = 0.2057                                         min =          2
     Between = 0.2370                                         avg =       15.7
     Overall = 0.2333                                         max =         20

                                                F(7, 119)         =      30.75
corr(u_i, Xb) = -0.1284                         Prob > F          =     0.0000

                                  (Std. err. adjusted for 120 clusters in CID)
------------------------------------------------------------------------------
             |               Robust
    lrhom_un | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
    heritage |  -.0167442   .0039153    -4.28   0.000    -.0244969   -.0089915
  infantmort |  -.0016159   .0041996    -0.38   0.701    -.0099316    .0066997
         edu |  -1.925207   .5636842    -3.42   0.001    -3.041358   -.8090558
       unemp |    .006385   .0053949     1.18   0.239    -.0042975    .0170675
    popdense |  -.0003271   .0000697    -4.69   0.000    -.0004652   -.0001889
    perurban |  -.0133021   .0100379    -1.33   0.188    -.0331781    .0065739
    sexratio |  -.0146085    .003854    -3.79   0.000    -.0222398   -.0069772
       _cons |   5.985587   .6651534     9.00   0.000     4.668517    7.302657
-------------+----------------------------------------------------------------
     sigma_u |  1.0886886
     sigma_e |  .28565201
         rho |  .93559007   (fraction of variance due to u_i)
------------------------------------------------------------------------------
MAR06-PanelModels-UNODC.xml
dir : seeout

Fixed-effects (within) regression               Number of obs     =      1,789
Group variable: CID                             Number of groups  =        123

R-squared:                                      Obs per group:
     Within  = 0.2160                                         min =          5
     Between = 0.2962                                         avg =       14.5
     Overall = 0.2879                                         max =         18

                                                F(7, 122)         =      51.32
corr(u_i, Xb) = -0.2815                         Prob > F          =     0.0000

                                  (Std. err. adjusted for 123 clusters in CID)
------------------------------------------------------------------------------
             |               Robust
    lrhom_un | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         rol |  -.4302229   .0941454    -4.57   0.000    -.6165931   -.2438526
  infantmort |  -.0090062    .004261    -2.11   0.037    -.0174413   -.0005712
         edu |  -2.467976   .5308081    -4.65   0.000    -3.518764   -1.417188
       unemp |   .0048263   .0044707     1.08   0.282    -.0040238    .0136765
    popdense |   -.000195   .0000599    -3.25   0.001    -.0003137   -.0000764
    perurban |  -.0190503   .0106958    -1.78   0.077    -.0402237     .002123
    sexratio |  -.0125147   .0032815    -3.81   0.000    -.0190107   -.0060187
       _cons |   5.620058   .6328446     8.88   0.000     4.367278    6.872837
-------------+----------------------------------------------------------------
     sigma_u |  1.0909649
     sigma_e |  .27129698
         rho |  .94176162   (fraction of variance due to u_i)
------------------------------------------------------------------------------
MAR06-PanelModels-UNODC.xml
dir : seeout

. 
. //      #2
. //      Panel models without 
. foreach var in fraser heritage rol {
  2.         xtreg `dv' `var' `iv2' `cont', fe 
  3.         outreg2 using `file'.dta, append `opt' 
  4.         }

Fixed-effects (within) regression               Number of obs     =      1,949
Group variable: CID                             Number of groups  =        123

R-squared:                                      Obs per group:
     Within  = 0.1913                                         min =          5
     Between = 0.2204                                         avg =       15.8
     Overall = 0.2113                                         max =         20

                                                F(7, 1819)        =      61.46
corr(u_i, Xb) = -0.1324                         Prob > F          =     0.0000

------------------------------------------------------------------------------
    lrhom_un | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      fraser |  -.1410917   .0240031    -5.88   0.000    -.1881682   -.0940152
  infantmort |  -.0055433   .0019627    -2.82   0.005    -.0093927   -.0016938
         edu |  -1.930045   .2491434    -7.75   0.000    -2.418682   -1.441407
       unemp |     .00663   .0027432     2.42   0.016     .0012499    .0120102
    popdense |  -.0003164    .000086    -3.68   0.000    -.0004851   -.0001476
    perurban |  -.0158748   .0038635    -4.11   0.000    -.0234522   -.0082974
    sexratio |  -.0143736   .0020449    -7.03   0.000    -.0183842    -.010363
       _cons |   6.094406   .3361439    18.13   0.000     5.435137    6.753674
-------------+----------------------------------------------------------------
     sigma_u |  1.0898811
     sigma_e |  .28626146
         rho |  .93546504   (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(122, 1819) = 216.17                 Prob > F = 0.0000
MAR06-PanelModels-UNODC.xml
dir : seeout

Fixed-effects (within) regression               Number of obs     =      1,878
Group variable: CID                             Number of groups  =        120

R-squared:                                      Obs per group:
     Within  = 0.2057                                         min =          2
     Between = 0.2370                                         avg =       15.7
     Overall = 0.2333                                         max =         20

                                                F(7, 1751)        =      64.78
corr(u_i, Xb) = -0.1284                         Prob > F          =     0.0000

------------------------------------------------------------------------------
    lrhom_un | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
    heritage |  -.0167442   .0022125    -7.57   0.000    -.0210837   -.0124047
  infantmort |  -.0016159   .0019576    -0.83   0.409    -.0054554    .0022236
         edu |  -1.925207   .2504676    -7.69   0.000    -2.416454    -1.43396
       unemp |    .006385   .0028488     2.24   0.025     .0007977    .0119723
    popdense |  -.0003271    .000086    -3.80   0.000    -.0004957   -.0001584
    perurban |  -.0133021    .003891    -3.42   0.001    -.0209336   -.0056707
    sexratio |  -.0146085    .002043    -7.15   0.000    -.0186156   -.0106014
       _cons |   5.985587   .3180186    18.82   0.000     5.361851    6.609323
-------------+----------------------------------------------------------------
     sigma_u |  1.0886886
     sigma_e |  .28565201
         rho |  .93559007   (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(119, 1751) = 213.49                 Prob > F = 0.0000
MAR06-PanelModels-UNODC.xml
dir : seeout

Fixed-effects (within) regression               Number of obs     =      1,789
Group variable: CID                             Number of groups  =        123

R-squared:                                      Obs per group:
     Within  = 0.2160                                         min =          5
     Between = 0.2962                                         avg =       14.5
     Overall = 0.2879                                         max =         18

                                                F(7, 1659)        =      65.28
corr(u_i, Xb) = -0.2815                         Prob > F          =     0.0000

------------------------------------------------------------------------------
    lrhom_un | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         rol |  -.4302229   .0434475    -9.90   0.000    -.5154405   -.3450052
  infantmort |  -.0090062    .002192    -4.11   0.000    -.0133057   -.0047068
         edu |  -2.467976   .2803202    -8.80   0.000    -3.017795   -1.918157
       unemp |   .0048263   .0027858     1.73   0.083    -.0006378    .0102905
    popdense |   -.000195   .0000921    -2.12   0.034    -.0003757   -.0000144
    perurban |  -.0190503   .0043029    -4.43   0.000      -.02749   -.0106107
    sexratio |  -.0125147   .0019834    -6.31   0.000    -.0164048   -.0086245
       _cons |   5.620058   .3044629    18.46   0.000     5.022885     6.21723
-------------+----------------------------------------------------------------
     sigma_u |  1.0909649
     sigma_e |  .27129698
         rho |  .94176162   (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(122, 1659) = 188.75                 Prob > F = 0.0000
MAR06-PanelModels-UNODC.xml
dir : seeout

. 
. //      #3
. //      save and close 
. save `file'.dta, replace 
file MAR06-PanelModels-UNODC.dta saved

. log close 
      name:  <unnamed>
       log:  /Volumes/rdss_meghrogers/Current Research/Markets-Pridemore/Work/MA
> R06-PanelModels-UNODC.log
  log type:  text
 closed on:   5 May 2025, 14:48:00
--------------------------------------------------------------------------------
